import $http from '../../../servers/http';
import { Result } from '../../schema/Result';
/* 系统配置-语音识别厂商管理
---------------------------------------------------------------- */
import { VoiceRecognitionInfo } from '../../schema/VoiceRecognition';
/**新增语音识别厂商 */
export const createVoiceRecognition = (data: VoiceRecognitionInfo): Promise<any> => {
  return $http.post({
    url: '/icms/asrmanufacturermanage/asrmanufacturers',
    data,
  });
};

/**删除语音识别厂商 */
export const deleteVoiceRecognition = (id: number): Promise<Result<null>> => {
  return $http.delete({
    url: `/icms/asrmanufacturermanage/asrmanufacturers/${id}`,
  });
};

/**编辑语音识别厂商 */
export const modifyVoiceRecognition = (
  id: number,
  data: VoiceRecognitionInfo
): Promise<Result<null>> => {
  return $http.put({
    url: `/icms/asrmanufacturermanage/asrmanufacturers/${id}`,
    data,
  });
};

/**查询语音识别厂商列表 */
export const getVoiceRecognitionList = (data: {
  pageSize: number;
  pageNo: number;
  asrManufacturerName?: string;
}): Promise<Result<VoiceRecognitionInfo[]>> => {
  return $http.get({
    url: '/icms/asrmanufacturermanage/asrmanufacturers',
    data,
  });
};
